﻿#pragma once

#include "../Shared/Functions/IniReader.h"
#include <string>
#include <vector>
#include "../stringhelper.h"
#include "../tangible_filesystem.h"

using namespace Client::MirSounds;

namespace Client
{
    class Settings
    {
    public:
        static constexpr long long CleanDelay = 600000;
        static int ScreenWidth;
        static int ScreenHeight;
    private:
        static InIReader *Reader;

        static bool _useTestConfig;
    public:
        static bool getUseTestConfig();
        static void setUseTestConfig(bool value);

        static const std::string DataPath, MapPath, SoundPath, ExtraDataPath, ShadersPath, MonsterPath, GatePath, FlagPath, NPCPath, CArmourPath, CWeaponPath, CWeaponEffectPath, CHairPath, AArmourPath, AWeaponPath, AHairPath, ARArmourPath, ARWeaponPath, ARHairPath, CHumEffectPath, AHumEffectPath, ARHumEffectPath, MountPath, FishingPath, PetsPath, TransformPath, TransformMountsPath, TransformEffectPath, TransformWeaponEffectPath, MouseCursorPath;

        //Logs
        static bool LogErrors;
        static bool LogChat;
        static int RemainingErrorLogs;

        //Graphics
        static bool FullScreen;
        static bool Borderless;
        static bool TopMost;
        static std::string FontName; //"MS Sans Serif"
        static float FontSize;
        static bool UseMouseCursors;

        static bool FPSCap;
        static int MaxFPS;
        static int Resolution;
        static bool DebugMode;

        //Network
        static bool UseConfig;
        static std::string IPAddress;
        static int Port;
        static constexpr int TimeOut = 5000;

        //Sound
        static int SoundOverLap;
    private:
        static unsigned char _volume;
    public:
        static unsigned char getVolume();
        static void setVolume(unsigned char value);

    private:
        static unsigned char _musicVolume;
    public:
        static unsigned char getMusicVolume();
        static void setMusicVolume(unsigned char value);

        //Game
        static std::string AccountID;
        static std::string Password;

        static bool SkillMode;
        static bool SkillBar;
        static bool Effect;
        static bool LevelEffect;
        static bool DropView;
        static bool NameView;
        static bool HPView;
        static bool TransparentChat;
        static bool ModeView;
        static bool DuraView;
        static bool DisplayDamage;
        static bool TargetDead;
        static bool HighlightTarget;
        static bool ExpandedBuffWindow;

        static std::vector<std::vector<int>> SkillbarLocation;

        //Quests
        static std::vector<int> TrackedQuests;

        //Chat
        static bool ShowNormalChat;
        static bool ShowYellChat;
        static bool ShowWhisperChat;
        static bool ShowLoverChat;
        static bool ShowMentorChat;
        static bool ShowGroupChat;
        static bool ShowGuildChat;

        //Filters
        static bool FilterNormalChat;
        static bool FilterWhisperChat;
        static bool FilterShoutChat;
        static bool FilterSystemChat;
        static bool FilterLoverChat;
        static bool FilterMentorChat;
        static bool FilterGroupChat;
        static bool FilterGuildChat;


        //AutoPatcher
        static bool P_Patcher;
        static std::string P_Host;
        static std::string P_PatchFileName;
        static bool P_NeedLogin;
        static std::string P_Login;
        static std::string P_Password;
        static std::string P_ServerName;
        static std::string P_BrowserAddress;
        static std::string P_Client;
        static bool P_AutoStart;

        static void Load();

        static void Save();

        static void LoadTrackedQuests(const std::string &Charname);

        static void SaveTrackedQuests(const std::string &Charname);



    };


}
